package com.hwl.vod.controller;

import com.hwl.commonutils.result.RespBean;
import com.hwl.vod.service.VodService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags = "前台视频点播")
@RestController
@RequestMapping("/api/vodMedia")
public class MediaController {

    @Resource
    private VodService vodService;

    @ApiOperation("获取视频播放凭证")
    @GetMapping("getPlayAuth/{videoSourceId}")
    public RespBean getPlayAuth(@PathVariable String videoSourceId) {
        return RespBean.ok().data(vodService.getPlayAuth(videoSourceId));
    }
}
